package com.ebao.po.qa;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ebao.constants.UserType;

/**
 * @desc 收藏问答
 * @author snow
 * @date 2012-7-10
 */
@Entity
@Table(name = "T_CollectQA")
public class TCollectQA implements Serializable {

	private static final long serialVersionUID = -7008119026899425482L;
	
	private Long id;
	private UserType collecterType;		// 收藏者类型
	private String collecter;			// 收藏者Id
	private TQuestion question;			// 收藏的问题
	private String collectDate;			// 收藏日期

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(optional = false, targetEntity = TQuestion.class)
	@JoinColumn(name = "question_id")
	public TQuestion getQuestion() {
		return question;
	}

	public void setQuestion(TQuestion question) {
		this.question = question;
	}

	public UserType getCollecterType() {
		return collecterType;
	}

	public void setCollecterType(UserType collecterType) {
		this.collecterType = collecterType;
	}

	public String getCollecter() {
		return collecter;
	}

	public void setCollecter(String collecter) {
		this.collecter = collecter;
	}

	@Column(length = 18)
	public String getCollectDate() {
		return collectDate;
	}

	public void setCollectDate(String collectDate) {
		this.collectDate = collectDate;
	}

}
